package com.leo.entity;

import com.almasb.fxgl.dsl.FXGL;
import com.almasb.fxgl.entity.Entity;
import com.almasb.fxgl.entity.EntityFactory;
import com.almasb.fxgl.entity.SpawnData;
import com.almasb.fxgl.entity.Spawns;

/**
 * @Author: wangss
 * @CreateTime: 2023-05-31  23:40
 * @Description: TODO
 */
public class ChatEntityFactory implements EntityFactory {

    @Spawns("bg")
    public Entity createBg(SpawnData spawnData) {
        return FXGL.entityBuilder(spawnData)
                .view(FXGL.texture("bg1.jpg"))
                .build();
    }
}
